# 设置参数
from lib.ucloud.ufile import config

# {
#     "public_key" : "dnTOE65msHXqG3pu8+jBZePI2jTyZPOS0nRl3p42+PX0pmqbb+f3tA==",
#     "private_key" : "471d14266b9ad142539e4653310497652fca4254",
#     "proxy_host" : "www.cn-bj.ufileos.com",
#     "api_host" : "api.spark.ucloud.cn"
# }


def read_config():
    dev = False

    url = ''

    if dev:
        url = '.internal-cn-gd-02.ufileos.com'
    else:
        url = '.cn-gd.ufileos.com'

    # 设置上传host后缀,外网可用 .ufile.ucloud.cn
    # 内网域名请参考url：
    # https://docs.ucloud.cn/storage_cdn/ufile/faq#各机房proxy_host地址分别是什么
    config.set_default(uploadsuffix=url)
    # 设置下载host后缀，比如CDN下载 .ufile.ucloud.com.cn
    config.set_default(downloadsuffix=url)
    # 设置请求连接超时时间，单位为秒
    config.set_default(connection_timeout=60)

    public_key = 'TOKEN_3478766b-f534-4a95-ae2b-2684373f2110'  # 添加自己的账户公钥
    private_key = '0a6146a9-3ffa-4f51-b513-0ac81ab821fa'  # 添加自己的账户私钥

    bucket = "hpc2"

    return public_key, private_key, bucket
